EMT Practice Test

1. Question Content...


Question List

Question1: The developer is required to convert a modules database scripts from old install/upgrade setup files to a data patches format and does not want to apply database changes that were already done by install/upgrade scripts.
The current module version is 1.5A
What would be the recommended solution to skip changes that were already applied via old format (install/upgrade scripts)?

Question2: An Adobe Commerce developer is asked to restrict access onboth the admin menu item Custom_Reports:
:Financial and the admin pagecustomreport/financial/index attached to the menu. The developer has added the resource Customreports/financial in etc/ael.xml. and the following code on etc/adninhtml/nenu.xml :

Given that const ADMIN_RESOURCE was NOT set on the controller of customreports-financial/index and the secret key is not enabled in the URL which users can access the page?

Question3: A merchant tasked you to add an input field for notes to the Customer Account Information backend page.
Which three actions do you specify in a module's Data Patch to add a customer notes attribute? (Choose three.)

Question4: Magento allows you to specify custom values per store for product attributes created in the admin panel.
Which architectural pattern makes it possible?

Question5: You are tasked to install an extension to the merchant's Magento instance.
The extension is developed by the company called MyCompany and its codebase is available from all four locations listed below.
Which two installations options do you choose from to prevent version conflicts during upgrade? (Choose two.)

Question6: You are writing a customization for the customer module. You need to make sure the configuration files from your module are loaded after the customer module's configuration.
Where should the dependency be declared?

Question7: You are adding a child node to the product.info block using the XML:

How will this block be rendered?

Question8: An integration named Marketing is created on the Adobe Commerce instance. The integration has access on Magento_Customer::customer resources and the access token is xxxxxx .
How would the rest API be called to search the customers?

Question9: What happens when a category's is_anchor attribute is set to 1?

Question10: You are developing a module MyCompany_StoreInfo to display information about brick and mortar stores on a frontend page. The displayed information varies based on the country of a given store.
What two elements automatically render their children? (Choose two.)

Question11: You are building a new module to add extra functionality to the Magento application.
What files are required?

Question12: An international merchant is complaining that changes are taking too long to be reflected on the frontend after a full product import. Thinking it may be database issues, the Adobe Commerce developer collects the following entity counts;
* Categories: 900
* Products: 300k
* Customers: 700k
* Customer groups : 106
* Orders :1600k
* Invoices: 500k
* Creditmemos: 50k
* Websites: 15
* Stores : 45
What is a probable cause for this?

Question13: You need to control access to a custom controller action.
How do you tell Magento about this new control option?

Question14: An Adobe Commerce developer has been taskedto create a new rest API endpoint to get a list of items for a CustomEntity . When testing the endpoint, it throws an exception.
This is the code the developer has written forMyVendor\Module\Api\CustomEntityRepositoryInterface:

And this is the implement method within MyVendor\MyModulemodel\CustomEntityRepository:

What is wrong with the code?

Question15: Which entity in Magento supports scoped attributes?

Question16: There are two different configurable products which both share one variation. The shared variation is represented by the same simple product.
A customer added both configurables to the cart with the same selected variation?
How will they be displayed?

Question17: You are customizing the display of product details page. On this page ur customer need to change the url in which the product category name will be appear as http://mystore.com/women/tops-women/helena-hooded-fleece.html, Keeping ,maintainability in mind, How to get product url with category?

Question18: Products may be accessed using SEO friendly URLs like /my-product instead of /catalog/product/view/id/{ID}
How is this one?

Question19: How does Magento store customer address attribute values?

Question20: What scopes are available for customer attributes?

Question21: Which two ways does Magento persist category relationships in the database? (Choose two.)

Question22: \Magento\Sales\Model\Api\OrderRepositoryInterface::getList accepts a SearchCriteriaInterface to filter and sort information.
What class assists in creating an instance for SearchCriteriaInterface?

Question23: When using the traditional Magento frontend, an Adobe Commerce developer is tasked to create a before plugin every time that the totals information loads on the cart page summary.
Considering performance, where would the di .xml be added?

Question24: Which two tasks are supported by Magento CLI? (Choose two.)

Question25: The constructor function for \Magento\Catalog\Model\Category contains this excerpt:

With the automatic dependency injection that Magento provides, how is the StoreManagerInterface resolved?

Question26: A custom module must make changes to the schema following each setup:upgrade run.
This must be done after all other module's schema updates have been applied.
How is this accomplished?

Question27: The module MyCompany_MyModule provides custom admin interface pages.
Access to these pages should only be granted to specific users.
You add the required configuration to the module's acl.xml file, but the setting does not seem to work as expected.
How do you visually check if Magento evaluates your ACL resource as expected?

Question28: You are working on a jewelry store that sells rings. Each ring allows an adjustment in size. The customer specifies finger size in inches and the merchant physically adjusts the stocked ring to the required size.
How is this represented in Magento?

Question29: Which three scopes can be used to set different System Configuration values in Magento? (Choose three.)

Question30: You want to declare a block of the type \Magento\Framework\View\Element\Template with a template named view.phtml in the layout XML.
What is the correct layout declaration for this?

Question31: While developing a module you need to modify an existing Data Patch.
How can you force Magento to execute an existing Data Patch file again?

Question32: You have created a custom module which must perform an action immediately after an order is placed, but only on the store front of the merchant site. You have selected the checkout_submit_all_after as the target event which the module will observe.
In which file will the event observer be declared?

Question33: A module declares the route:

What is the layout handle of the storefront path /custom/feature/?

Question34: You need to find all orders in the processing state. You have written the code:

When you run the code, you get the following exception:

How do you resolve the exception?

Question35: A logistics company with an Adobe Commerce extension sends a list of reviewed shipment fees to all its clients every month in a CSV file. The merchant then uploads this CSV file to a "file upload" field in admin configuration of Adobe Commerce.
What are the two requirements to display the "file upload' field and process the actual CSV import? (Choose two.)

Question36: An Adobe Commerce Developer is tasked with creating a module which generates a sitemap by cron. While writing the module, they realize they will need to use environment emulation to ensure the data is generated from a frontend perspective. They notice that the Emulation: :startEnvironmentEmulation() method accepts a
$force parameter.
Why would this be set to true?

Question37: You are building an tool that imports products from an ERP. There are 20 columns of additional information that are associated with each product. This extra information must also be associated with an update time to know when to refresh the data.
Keeping maintainability in mind, how do you build this into Magento?

Question38: You are making some major adjustments to a core Magento class (ClassA). These adjustments are only necessary when utilized from a specific Magento class (ClassB). You have created MyClass that contains the needed customizations.
Keeping upgradeability in mind, how do you configure di.xml to make the substitution happen?

Question39: You have created a new product type, sample, and need to customize how it renders on the shopping cart page.
Keeping maintainability in mind, how do you add a new renderer?

Question40: You are adding an entry to the backend menu. To do so you open a core etc/adminhtml/menu.xml file as a reference.
In the file you see the node:

What is the result of specifying resource="Magento_Catalog::catalog"?

Question41: In the module located at app/code/MyCompany/MyModule there is a JS module in the file view/frontend/web/register.js. The Magento base URL is https://magento.host/ and the luma theme with the en_US locate is used.
What is the public URL for this file?

Question42: Which two techniques can be used to protecta storefront POST action againstCross Site Request Forgery (CSRF) attacks? (Choose two.)

Question43: How many shipping addresses may be selected for an order during the checkout process?

Question44: In layout files you can change al element's order on a page.
This can be done using one of the following:
* <move> instruction
* before and after element attributes?
How are two methods different?

Question45: You want to remove a column introduced by a third-party extension via declarative schema.
How do you do that?

Question46: A merchant gives you the module MyCompany_MyModule to install.
How do you identify which REST endpoints are supported by the module?

Question47: An Adobe Commerce developer creates a new website using a data patch. Each website will have unique pricing by website. The developer does not have visibility into the production and staging environments so they do not know what the configuration currently is.
How would they ensure the configuration is deployed and consistent across all environments?

Question48: You need to add a new text attribute to all products in the Magento store. When this attribute is displayed on the product page, its values must be different depending on the selected language.
Keeping simplicity in mind, how do you add this attribute?

Question49: The module MyCompany_MyModule will add a new page to the admin interface at the URL path admin/mycompany/entity_grid.
How do you name the file containing the action controller class so the admin router matches the path to the class?

Question50: While integrating a merchant's product information management system with Magento, you create a module MyCompany_MerchantPim that adds a catalog product EAV attribute pim_entity_id programmatically. In which type of setup script do you create the EAV attribute?

Question51: While reviewing a layout file named sales_order_view.xml you notice the element <update handle="customer_account"/>
What is the purpose of this element?

Question52: An Adobe Commerce Developer is tasked with writing an importer for a custom entity. After the work is complete and deployed, they start receiving complaints from their client that the importer does not work and fails every time they use it.
The developer realizes that the client is importing a file which does not match the format required for the importer to process correctly.
What two features would the developer add to this importer to prevent this? (Choose two.)

Question53: There is the task to create a custom product attribute that controls the display of a message below the product title on the cart page, in order to identify products that might be delivered late.
The new EAV attribute is.deloyed has been created as aBooleanand is working correctly in the admin panel and product page.
What would be the next implementation to allow the is_delayed EAV attribute to be used in the .phtml cart page such as $Block->getProduct()->getIsDelayed() ?
A)

B)

C)

Question54: You have created a module controller that responds to the following URL:
/mycompany/product/load/id/123.
Which two methods will load the product model by ID as specified in the URL? (Choose two.)

Question55: You added a new constructor argument to an existing action controller class.
When you reload the page you get a PHP error that the wrong argument is passed to the class.
How do you fix this?

Question56: How do you obtain customer information in a JavaScript module?

Question57: You are creating a new page layout for your custom module.
What is the primary difference between container and block elements?

Question58: A Data Patch in a module being investigated implements \Magento\Framework\Setup\Patch\Patchversionlnterface and contains a getversion method which returns the string '2.4.2'.
What is the implication of this when php bin/magento setup:upgrade is run?

Question59: A message queue currently has queue/consumer-wait-for-messages set to true, which allows the consumer process to run until a message is inserted into the queue. A piece of functionality is driven by data stored in the model.\Magento\Variable\\Model\variable and this value is only loaded once during the consumer run. If the variable is updated we want the consumer to restart so that the new value is loaded into memory without having to reload the variable on each message consumed.
The Adobe Commerce developer has created an after plugin on the \Magento\variable\variable::save() function.
How would the developer use the plugin to trigger the consumer restart?

Question60: There is an integration developed using a cron service that runs twice a day. sending the Order ID to the integrated ERP system if there are orders that are able to create an invoice. The order is already loaded with the following code:
$order =$this->orderRepository->get($orderid);
In order to verify if the store has invoices to be created, what implementation would the Adobe Commerce developer use?
A)

B)

C)